<div class="page-head">
    <h2>Registered Successfully!</h2>
    <ol class="breadcrumb">
        <li><?= anchor('home/index', 'Home'); ?></li>
        <li class="active">Register</li>
    </ol>
</div>

<div class="cl-mcont">
    <div class="block-flat">
        <div class="header">
            <h2>Your registration is successful!</h2>
        </div>
        <div class="content">
            <div class="alert alert-success alert-white rounded">
                <div class="icon"><i class="fa fa-check"></i></div>
                <strong>Success!</strong> You will be redirected to Home Page in <span id="time">5</span> <span id="text">seconds</span>
            </div>
        </div>
    </div>
    <script>
        var timer = setInterval(function() {
            var current = parseInt($('#time').text());
            if (current > 0) {
                $('#time').text(current - 1);
                if (current > 2) {
                    $('#text').text('seconds');
                } else {
                    $('#text').text('second');
                }
            } else {
                clearInterval(timer);
            }
        }, 1000);
        setTimeout(function() {
            window.location = 'index';
        }, 6000);
    </script>
</div>